package com.beiding.pojo.auth;

import lombok.Getter;
import lombok.Setter;
import org.springframework.security.core.GrantedAuthority;

@Getter
@Setter
public class Authority implements GrantedAuthority {

    private static final long serialVersionUID = 1L;


    private String authority;

    @Override
    public String toString() {
        return authority;
    }

    @Override
    public boolean equals(Object obj) {
        return obj instanceof Authority && ((Authority) obj).getAuthority().equals(authority);
    }

    @Override
    public int hashCode() {
        return authority.hashCode();
    }
}
